﻿//选择客户(单选）
var columns =
            [
                 { display: 'StockID', name: 'StockID', type: 'text', hide: 1 },
                 { display: 'ProductID', name: 'ProductID', type: 'text', hide: 1 },
                 { display: '产品类别', name: 'TypeName', mintWidth: 80, width: 120 }, 
                { display: '产品名称', name: 'ProductName', mintWidth: 80, width: 120 }, 
                {display: '产品编码', name: 'ProductCode', mintWidth: 100, width: 140 },
                { display: '产品规格', name: 'ProductStandard', mintWidth: 100, width: 140 },
                 { display: '单价', name: 'SellPrice', type: 'float', mintWidth: 100, width: 140 },
                { display: '所属仓库', name: 'StorehouseName', mintWidth: 80, width: 120 },
                { display: '商品数量', name: 'StockCount', mintWidth: 80, width: 120 }
             ];

var manager;
$(document).ready(function () {
    initligerGrid();
    $("#btnSearch").unbind("click").bind("click", initligerGrid);
});

function initligerGrid() {
    manager = null;
    manager = $("#productsGrid").ligerGrid({
        columns: columns,
        title: '产品信息列表',
        showTitle: true,
        width: '100%',
        enabledSort: true,
        height: '100%',
        checkbox: true,
        rownumbers: true,
        parms: { orgCode: $("#HidOrgCode").val(), productGG: $("#productGG").val(), productName: $("#productName").val(), productCode: $("#productCode").val() },
        url: "../Stock/GetJsonOfStocks?orgCode=" + $("#HidOrgCode").val()
    });
}
